import { createWebHistory, createRouter } from 'vue-router'

import autoPage from './utils/auto-route.js'
import { createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: `/`,
    // component: () => import('./views/chat/index.vue'),
    redirect: '/chat',
  },
  ...autoPage(),
]

const router = createRouter({
  history: createWebHistory(),
  // history: createWebHashHistory(),
  routes,
})

export default router
